home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / gnu / bash / bash_110 / unixmode / src_d3.zoo / patches.zoo / src / builtins / Makefile.cross next >
Encoding:
Makefile  |  1991-10-23  |  1.9 KB  |  71 lines

  1. # This Makefile for building libbuiltins.a is in -*- text -*- for Emacs.
  2. #
  3. MKBUILTINS = ./mkbuiltins
  4. RANLIB = /usr/bin/ranlib
  5. CFLAGS = -g -I.. -I.
  6. SHELL = /bin/sh
  7. CC = cc
  8. HCC = gcc
  9. AR = ar
  10. RM = rm -f
  11. CP = cp
  12.  
  13. .SUFFIXES:
  14. .SUFFIXES: .def .c .o
  15. # How to make a .o file from a .def file.
  16. .def.o:
  17.     $(RM) $@
  18.     $(MKBUILTINS) $(DIRECTDEFINE) $*.def
  19.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $*.c
  20.     $(RM) $*.c
  21.  
  22. # How to make a .c file from a .def file.
  23. .def.c:
  24.     $(RM) $@
  25.     $(MKBUILTINS) $(DIRECTDEFINE) $*.def
  26.  
  27. # Here is a rule for making .o files from .c files that does not
  28. # force the type of the machine (like -M_MACHINE) into the flags.
  29. .c.o:
  30.     $(RM) $@
  31.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $*.c
  32.  
  33. DEFS =  alias.def bind.def break.def builtin.def cd.def colon.def \
  34.     command.def declare.def echo.def enable.def eval.def \
  35.     exec.def exit.def fc.def fg_bg.def hash.def help.def history.def \
  36.     jobs.def kill.def let.def read.def return.def set.def setattr.def \
  37.     shift.def source.def suspend.def test.def times.def trap.def \
  38.     type.def ulimit.def umask.def wait.def getopts.def reserved.def
  39.  
  40. STATIC_SOURCE = common.c getopt.c getopt.h
  41.  
  42. OFILES = alias.o bind.o break.o builtin.o cd.o colon.o command.o \
  43.     common.o declare.o echo.o enable.o eval.o exec.o exit.o \
  44.     fc.o fg_bg.o hash.o help.o history.o jobs.o kill.o \
  45.     let.o read.o return.o set.o setattr.o shift.o source.o \
  46.     suspend.o test.o times.o trap.o type.o ulimit.o umask.o \
  47.     wait.o getopts.o getopt.o builtins.o
  48.  
  49. THINGS_TO_TAR = $(DEFS) $(STATIC_SOURCE) Makefile ChangeLog
  50.  
  51. CREATED_FILES = builtext.h builtins.c 
  52.  
  53. all: $(MKBUILTINS) builtins.olb
  54.  
  55. builtins.olb: $(MKBUILTINS) $(OFILES)
  56.     $(RM) $@
  57.     $(AR) cr $@ $(OFILES)
  58.     $(RANLIB) s $@
  59.  
  60. builtext.h builtins.c: $(MKBUILTINS) $(DEFS)
  61.     $(RM) builtext.h builtins.c
  62.     $(MKBUILTINS) -externfile builtext.h -structfile builtins.c \
  63.     -noproduction $(DEFS)
  64.  
  65. mkbuiltins: mkbuiltins.c
  66.     $(HCC) $(CFLAGS) -o mkbuiltins mkbuiltins.c
  67.  
  68. ulimit.o: ulimit.def pipesize.h
  69.  
  70.  
  71.